[Main]
Name=Cuff
Author=Carrie O'Kaye, Darkhorse Pterid and Graphite
D1=Function:
D2=One Furre, by the name of Captor, will be able to capture another Furre (the captive) and drag him around the map.
D3=To activate the function, Captor says, "cuff."
D4=To deactivate the function, Captor says, "uncuff."
D5=To capture a captive, Captor bumps into a Furre.
V1=Captor Name
T1=Furre Name
V2=Cuffing Activated Variable
T2=Variable Name
V3=Captor Position Variable
T3=Variable Name
V4=Captive Position Variable
T4=Variable Name


[Code]
*Cuffing code
(0:0) When everything is starting up,
   (5:300) set variable %dreamStarted to the value 0
(0:100) When 1 seconds have passed, offset by 0,
(1:200) and variable %dreamStarted is equal to 0,
   (5:300) set variable %dreamStarted to the value 1
   (5:300) set variable %^2^ to the value 0

* When Captor says 'cuff', then enable the trapping mode.
(0:31) When a furre says {cuff},
 (1:70) and their name is {^1^},
 (1:200) and variable %^2^ is equal to 0,
          (5:300) set variable %^2^ to the value 1.

* When Captor walks into a furre while trapping mode is active, then 'cuff' the furre.
(0:1) Whenever somebody moves,
 (1:70) and their name is {^1^},
 (1:4) and they bump into a furre,
 (1:200) and variable %^2^ is equal to 1,
          (5:350) set variable %^3^ to the X,Y position the triggering furre (moved from/is standing at).
          (5:351) set variable %c^4^ to the X,Y position the triggering furre moved to.

* When the captor says 'uncuff' and we're currently 'cuffing' someone, then release this furre.
(0:31) When a furre says {uncuff},
 (1:70) and their name is {^1^},
 (1:200) and variable %^2^ is equal to 1,
          (5:300) set variable %^3^ to the value 0.
          (5:300) set variable %^4^ to the value 0.
          (5:300) set variable %^2^ to the value 0.

* When the captive tries to move, move him back to where he came from
(0:1) Whenever somebody moves,
(1:19) and they (moved from/are standing at) position (%^4^),
 (1:200) and variable %^2^ is equal to 1,
          (5:18) move the triggering furre back where they came from.

* When the captor moves succesfully, move the captive into the space he just left.
(0:1) Whenever somebody moves,
 (1:5) and they successfully moved,
 (1:19) and they (moved from/are standing at) position (%^3^),
 (1:200) and variable %^2^ is equal to 1,
          (5:351) set variable %^3^ to the X,Y position the triggering furre moved to.
   (3:2) at position (%^4^) on the map,
          (5:350) set variable %^4^ to the X,Y position the triggering furre (moved from/is standing at).
          (5:16) move any furre present to (%^4^) if there's nobody already there. 

